#ifndef SYSTEMSETTINGUI_H
#define SYSTEMSETTINGUI_H

#include <QWidget>
#include "BaseWidget.h"
#include "WidgetId.h"
#include "AppLog.h"
#include <QTimer>

namespace Ui {
class SystemSettingUi;
}

class SystemSettingUi : public BaseWidget
{
    Q_OBJECT

public:
    explicit SystemSettingUi(QWidget *parent = 0);
    ~SystemSettingUi();
    void activate()override;
    void inactivate()override{}
    void modifyLanByfile();
    void modifyLanByindex(int index);
    bool eventFilter(QObject *watched, QEvent *event)override;

private slots:
    void on_gohome_clicked();

    void on_goback_clicked();

    void on_version_clicked();

    void countTimerSlot();

    void on_resetFactory_clicked();

    void on_updateSoftware_clicked();

    void SystemSettingUi_Logoin_Slot();
    void SystemSettingUi_ResetFactory_Slot();
    void SystemSettingUi_UpdateSoftware_Slot();
    void SystemSettingUi_QuitLogoin_Slot();
    void clickedUserIdSlot();

    void on_settingData_clicked();

    void on_touchSound_clicked(bool checked);

    void on_saveDateTimeButton_clicked();

    void langChanged(int index);
signals:
    void clickedUserIdSignal();

protected:
    void changeEvent(QEvent *e);
private:
    Ui::SystemSettingUi *ui;
    QTimer* g_countTimer;
    int g_versionClickedCount = 0;
    int m_lanindex;
    bool flag = false;
};

#endif // SYSTEMSETTINGUI_H
